<?php
/******************************************************************************
 * Author: michal
 * Last modified: 2010-12-14 16:24
 * Filename: setting_head.view.php
 * Description: 头像设置 
 * 继承的变量:
 * $title,$user,$sitename,$lang,$arrowPosition,$extrahead,$content
 * 新声明的变量:
 * 
 * 变量列表:
 * $title,$user,$sitename,$lang,$arrowPosition,$extrahead,$content
 * 
 * 已使用的变量:
 * 
 * 子模板可用变量: 
 * 
******************************************************************************/
ob_start();
?>
<style type="text/css">
	.content{_ height:900px;}
	.tabformbar{text-align:center;clear:both;*display:inline;zoom:1;width:100%;}
	.tbList{margin-top:0px;}

	/*教育信息*/
	.eduinfotitile{margin-left:55px;margin-right:55px;font-size:14px;border-bottom:1px solid #d9d9d9;margin-top:20px;}
	.eduhistory{margin:auto 55px;margin-top:10px;}
	.eduhistory.withborder{border:1px solid #D0D0D0;}
	.eduhistory .eduitem{background:rgba(245, 245, 245, 0.2);margin:1px;padding:2px 4px;border-bottom:1px solid #d9d9d9;height:20px;}
	.eduhistory .eduitem.last{border-bottom:none;}
	ul.schoolattr{width:120px;}
	ul.schoolattr li{float:left;padding:0px 4px;}
	ul.schoolattr li.sep{color:#d0d0d0;}
	.eduicon{width:22px;height:16px;display:inline-block;vertical-align:middle;}
	.eduicon.school{background:url('style/images/edu_icons.gif') no-repeat 4px 0px;}
	.eduicon.department{background:url('style/images/edu_icons.gif') no-repeat -23px 0px;}
	#regions{margin:10px 0px;overflow:hidden;}
	#regions select{display:block;float:left;margin-left:8px;}
	#indexletter{clear:both;overflow:hidden;margin-top:10px;position:relative;width:100%;padding:12px 15px;margin-left:-15px;margin-right:-15px;border:1px solid #e0e4e9;border-width:1px 0;}
	#indexletter a{display:block;float:left;height:19px;overflow:hidden;padding:2px 6px 0;line-height:1.231;font-size:14px;}
	#indexletter .all{font-size:12px;}
	#indexletter a:hover{text-decoration: underline;}
	#indexletter a.cur{color:#333;background:#e5e5e5;cursor:default;}
	#indexletter a.cur:hover{text-decoration:none;}
	#schoollistwrapper{height:260px;overflow:hidden;overflow-y:auto;}
	#departmentwrapper{height:205px;overflow:hidden;overflow-y:auto;}
	ul.schoollist,ul.departmentlist{overflow:hidden;}
	ul.schoollist li,ul.departmentlist li{float:left;width:30%;display:block;line-height:26px;height:26px;color:#999;font-family:SimSun;}
	.noschool,.nodepartment{height:100%;line-height:220px;text-align:center;font-size:14px;color:#F47700;};
</style>
<script src="./js/worldcity.js"></script>
<script src="./js/relatedSelection.js"></script>
<script src="js/dialog.js"></script>
<script src="./js/richMsgBox.js"></script>
<script src="./js/settingedu.js"></script>
<script type="text/javascript">
	<?php if( isset($message) && !empty( $message["text"] ) ){ ?>
	$(function(){
		$.richAlertBox("<?php echo $message["text"];?>","<?php echo $message["type"];?>").show();
	});
	<?php } ?>
</script>
<?
$extrahead = ob_get_contents();
ob_end_clean();
ob_start();
?>
<div class="shezhimain edusetting">
	<div class="tabbar">
		<ul class="tabs">
			<li class="tab tab88x33"><a href="./index.php?m=userinfo">个人资料</a></li>
			<li class="tab tab88x33"><a href="./index.php?m=userhead">修改头像</a></li>
			<li class="tab tab88x33 active">教育信息</li>
			<li class="tab tab88x33"><a href="./index.php?m=userverify">认证方式</a></li>
			<li class="tab tab88x33"><a href="./index.php?m=userpsinfo">完善资料</a></li>
		</ul>
	</div>
	<div class="eduinfotitile">我的教育信息</div>
	<?php 
		if( array_key_exists("edu",$formuser) && !empty($formuser["edu"]) ){
			echo "<div class=\"eduhistory withborder\">";
			foreach ($formuser["edu"] as $index => $eduitem ){
				$lastEduItem = ($index == count($formuser["edu"]) - 1 );
				echo "<div class=\"eduitem cutoverflow";
				echo $lastEduItem?" last":"";
				echo "\">";
				echo "<div class=\"schoolname toleft\">";
				echo $eduitem["school"][1];
				if(array_key_exists("department",$eduitem) && !empty($eduitem["department"])){
					echo "&nbsp;";
					echo $eduitem["department"][1];
				}
				echo "</div>";
				echo "<ul class=\"schoolattr toright\">";
				echo "<li>".$eduitem["level"][1]."</li>";
				echo "<li class=\"sep\">|</li>";
				echo "<li>".$eduitem["year"]."入学</li>";
				echo "</ul>";
				echo "</div>";
			}
			echo "</div>";
		}else{
			echo "<div class=\"eduhistory fs14\">";
			echo "你尚未添加任何学校信息。";
			echo "</div>";
		}
	?>
	<div class="eduinfotitile">添加新的教育信息&nbsp;&nbsp;&nbsp;&nbsp;<span class="gray fs12">最多可添加10条教育信息</span></div>
	<form action="index.php?m=usereduinfo" method="post" id="setForm">
		<table border="0" cellspacing="0" cellpadding="0" class="tbList">
			<tbody>
				<tr>
					<th><span class="red">*</span>学历:</th>
					<td>
						<select id="schoollevelset" name="level"><option value="6" <?php echo $initialform["level"]==6?"selected":"";?>>博士</option><option value="5" <?php echo $initialform["level"]==5?"selected":"";?>>硕士</option><option value="4" <?php echo $initialform["level"]==4?"selected":"";?>>大学</option><!--<option value="3">高中</option><option value="2">初中</option><option value="1">小学</option>--></select><span class="error"><?php echo $formerror["level"]?></span>
					</td>
				</tr>
				<tr>
					<th><span class="red">*</span>入学年份:</th>
					<td>
						<select name="year" id="year">
							<option>请选择</option>
							<?php
								$yearArray = range(1900,2010);
								foreach($yearArray as $year)
								{
									echo "<option value=\"".$year."\" ".($initialform["year"]==$year?"selected":"").">".$year."年</option>";
								}
							?>
						</select>
						<span class="error"><?php echo $formerror["year"]?></span>
					</td>
				</tr>
				<tr id="shoolset">
					<th><span class="red">*</span>学校名称:</th>
					<td>
						<input type="hidden" name="schoolid" id="schoolid"></input>
						<input type="text" class="inputTxt" autocomplete="off" id="shoolinput" name="schoolname" /><a href="javascript:;" id="showschoolselect" class="eduicon school" title="点击图标添加学校"></a><span class="gray fs12">&nbsp;&nbsp;点击图标添加学校</span>	<span class="error"><?php echo $formerror["schoolid"]?></span>
					</td>
				</tr>
				<tr id="departmentset">
					<th>院系:</th>
					<td>
						<input type="hidden" name="departmentid" id="departmentid"></input>
						<input type="text" class="inputTxt" autocomplete="off" id="departmentinput" name="departmentname" /><a href="javascript:;" id="showdepartmentselect" class="eduicon department" title="点击图标添加院系信息"></a><span class="gray fs12">&nbsp;&nbsp;点击图标添加院系信息</span>
					</td>
				</tr>
				<tr>
					<th></th>
					<td><a class="saveBtn" id="submitbtn" onclick="return saveform();">保&nbsp;存</a></td>
				</tr>
			</tbody>
		</table>
	</form>
</div>
<?php
	$content = ob_get_contents();
	ob_end_clean();
	require_once pathJoin( TEMPLATE_DIR,'base_1col.view.php' );
?>

